package zjut.raymond.witdemo.util;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class MyFile {
    FileOutputStream fout;
    public MyFile(String filename) throws FileNotFoundException {
        fout = new FileOutputStream(filename,false);
    }

    public void write(String str) throws IOException {
        byte[] bytes = str.getBytes();
        fout.write(bytes);
    }

    public void close() throws IOException {
        fout.close();
        fout.flush();
    }
}
